<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
<body>
  <button onclick="getData()">getdata</button>
  <script>
    function getData() {
      axios.get('http://localhost:1008/getdata')
      .then(res => {
        console.log(res, 'res');
      })
    }
  </script>
</body>
</html>